Gap-Hamming problem